<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>String字符串对象</title>
</head>
<body>
<script>
    var str="a-b-c-d-f-g-h";
    var strings = str.split("-");
    console.log(strings)
    // console.log(strings.shift())
    var s = str.substr(1,5);//包括右区间
    console.log(s)
    var s1 = str.substring(1,5);//不包含右边
    console.log(s1)


</script>
</body>
</html>